package springclound2020.controller;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springclound2020.service.PaymentService;

import javax.annotation.Resource;

@RestController
@Slf4j
public class PaymentController {
    @Resource
    PaymentService paymentservice;

    @Value("${server.port}")
    private String serverPort;

    @GetMapping(value = "/payment/create")
    public CommonResult create(Payment payment){
        log.info("*****插入操作:");

        return new CommonResult(200,"插入成功！serverPort:"+serverPort);
    }

    @GetMapping(value = "/payment/lb")
    public String getPaymentLB(){
        return serverPort;
    }
}
